package cn.ecsd.util;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.ecsd.entity.SysEmployee;
import cn.ecsd.service.impl.EmployeeServiceImpl;

public class HibernateTest {
	public static void main(String[] args) {
		spring();
	}
	public static void spring(){
		ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
		EmployeeServiceImpl empImpl= ctx.getBean(EmployeeServiceImpl.class);
		SysEmployee e=new SysEmployee();
		e.setSn("001");
		e=empImpl.empLogin(e);
		System.out.println(e.getName()+" "+e.getSn());
	}
}
